<template>
  <div class="hello">
  <ul>
    <li v-for="(m,index) in movies" v-on:click="add" v-bind:class="{red:isRed}">{{index}}-{{m}}</li>
  </ul>
  </div>
</template>

<script>
export default {
  name: 'HelloWorld',
  data () {
    return {
      msg: 'ThinkHome',
      addNumber:0,
      movies:['盗梦空间','星际穿越','非常人贩','暴力街区'],
      isRed:true,
    }
  },
  methods: {
    add:function() {
      // console.log("加号方法");
      this.isRed = !this.isRed;
    }
  },
}
</script>

<style scoped>
h1 {
  font-weight: normal;
}

li {
  list-style-type:none;
}

.red {
  color: red;
}


</style>
